﻿using System;
using System.Collections.Generic;
using System.Text;


namespace Danser_Entity.Entities
{
    /// <summary>
    /// holds the information regarding a specific user registered in the DB
    /// </summary>
    public class User
    {
        private string userID;
        private string name;
        private PermissionLevel permission;

        #region C'tors:

        /// <summary>
        /// creates an empty User instance
        /// </summary>
        public User() {}

        /// <summary>
        /// creates a User instance
        /// </summary>
        /// <param name="userID">
        /// unique identifier for the user
        /// </param>
        /// <param name="name">
        /// suer name as retrieved from active directory
        /// </param>
        /// <param name="permission">
        /// the permission level to set for the user
        /// </param>
        public User(
            string userID,
            string name,
            PermissionLevel permission)
        {
            this.userID = userID;
            this.name = name;
            this.permission = permission;
        }

        #endregion

        #region Properties:

        /// <summary>
        /// property - unique identifier for the user
        /// </summary>
        public string UserID
        {
            get { return userID; }
            set { userID = value; }
        }

        /// <summary>
        /// property - user name as retrieved from active directory
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        /// <summary>
        /// property - the user permission level, may be changed
        /// </summary>
        public PermissionLevel Permission
        {
            get { return permission; }
            set { permission = value; }
        }

        #endregion
    }

    
}
